﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace BooksManagermentSystem
{
    public partial class StudentMain_form : Form
    {
        public StudentMain_form()
        {
            InitializeComponent();
        }

        string id;
        private void StudentMain_form_Load(object sender, EventArgs e)
        {
            //窗体加载时，获取登录的学生学号
            id = this.Tag.ToString();
            //顺便当他点击了书刊检索窗体
            书刊检索ToolStripMenuItem_Click(sender, e);
        }

        private void 书刊检索ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            RetrieveBook_form rm = new RetrieveBook_form();
            rm.MdiParent= this;
            rm.StartPosition= FormStartPosition.CenterScreen;
            rm.Show();
        }

        private void 个人信息ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            StudentInfo_form si = new StudentInfo_form();
            si.MdiParent = this;
            si.StartPosition= FormStartPosition.CenterScreen;
            si.Tag = id;
            si.Show();
        }

        private void StudentMain_form_FormClosed(object sender, FormClosedEventArgs e)
        {
            Application.Exit();
        }
    }
}
